import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freedom/page/mahjong/bloc/room_bloc_state.dart';
import 'package:freedom/page/mahjong/bloc/room_info.dart';

class RoomBloc extends Bloc<RoomEvent, RoomBlocState> {
  RoomBloc() : super(RoomBlocState.empty()) {
    on<UpdateUserTipsState>((event, emit) {
      return emit(state.newTipsState(event.state));
    });
  }
}

class UpdateRoomLife extends RoomEvent {
  RoomInfo roomState;

  UpdateRoomLife(this.roomState);
}

class UpdateUserTipsState extends RoomEvent {
  bool state;

  UpdateUserTipsState(this.state);
}

abstract class RoomEvent {}
